package com.bdqn.w.Test;

import com.bdqn.w.util.Greeting;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test1 {
    @Test
    public  void test(){

    ApplicationContext a=new ClassPathXmlApplicationContext("applicationContext.xml");
    Greeting greeting=(Greeting) a.getBean("helloSpring");
    greeting.sayGreeting();
    Greeting greeting1=(Greeting) a.getBean("helloSpring1");
    greeting1.sayGreeting();
}
}
